home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / il / ilCacheImg.z / ilCacheImg
Encoding:
Text File  |  2002-10-03  |  12.5 KB  |  265 lines

  1.  
  2.  
  3.  
  4. iiiillllCCCCaaaacccchhhheeeeIIIImmmmgggg((((3333))))      IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll      iiiillllCCCCaaaacccchhhheeeeIIIImmmmgggg((((3333))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      iiiillllCCCCaaaacccchhhheeeeIIIImmmmgggg - class to implement image data caching
  10.  
  11. IIIINNNNHHHHEEEERRRRIIIITTTTSSSS FFFFRRRROOOOMMMM
  12.      ilLink : ilImage
  13.  
  14. HHHHEEEEAAAADDDDEEEERRRR FFFFIIIILLLLEEEE
  15.      #include <il/ilCacheImg.h>
  16.  
  17. CCCCLLLLAAAASSSSSSSS DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  18.      ilCacheImg implements an abstract model of cached image data.  The cache
  19.      assumes that the image data is stored in fixed-size  rectangles called
  20.      pages. The main purpose of this class is the definition of a common API
  21.      for cached image objects.  Like ilImage, ilCacheImg is an abstract class,
  22.      requiring further derivation to be used as an object.  The real work of
  23.      implementing a caching mechanism is deferred to derived classes such as
  24.      ilMemCacheImg.
  25.  
  26. CCCCLLLLAAAASSSSSSSS MMMMEEEEMMMMBBBBEEEERRRR FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN SSSSUUUUMMMMMMMMAAAARRRRYYYY
  27.      PPPPaaaaggggeeee MMMMaaaannnnaaaaggggeeeemmmmeeeennnntttt
  28.  
  29.           virtual ilStatus flush(int discard=FALSE)
  30.           virtual size_t getCacheSize()
  31.  
  32.      DDDDeeeebbbbuuuuggggggggiiiinnnngggg aaaannnndddd mmmmoooonnnniiiittttoooorrrriiiinnnngggg
  33.  
  34.           void  addPagingCallback(ilCallback* cb, int autoDelete=FALSE)
  35.           ilStatus  removePagingCallback(ilCallback* cb)
  36.           int  hasPagingCallbacks()
  37.           ilStatus  doPagingCallbacks(ilPagingCbArg* callerArg)
  38.           virtual ilStatus  listResident(ilCallback* cb)
  39.  
  40.  
  41. FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNNSSSS
  42.      iiiillllCCCCaaaacccchhhheeeeIIIImmmmgggg(((())))
  43.  
  44.           ilCacheImg()
  45.  
  46.  
  47.           The constructor handles all necessary initialization of the call
  48.           backs.  Derived classes are responsible for everything else.
  49.  
  50.      aaaaddddddddPPPPaaaaggggiiiinnnnggggCCCCaaaallllllllbbbbaaaacccckkkk(((())))
  51.  
  52.           void  addPagingCallback(ilCallback* cb, int autoDelete=FALSE)
  53.  
  54.  
  55.           This function can used to add a callback on paging operations for
  56.           this object.  The _c_b parameter is a callback method or function.  A
  57.           new callback can be derived from the class ilPagingMethodCallback
  58.           (for a callback method), or from ilPagingFunctionCallback (for a
  59.           callback function).
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. iiiillllCCCCaaaacccchhhheeeeIIIImmmmgggg((((3333))))      IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll      iiiillllCCCCaaaacccchhhheeeeIIIImmmmgggg((((3333))))
  71.  
  72.  
  73.  
  74.           For example, to define the member function doPaging of class Foo as
  75.           a paging callback method:
  76.  
  77.                void Foo::doPaging(UserArgType* userArg,
  78.                          ilPagingCbArg* pageDesc);
  79.                typedef ilPagingMethodCallback<Foo,UserArgType*>
  80.                          UserPagingCallback;
  81.  
  82.                Foo foo;
  83.                UserArgType userArg;
  84.                UserPagingCallback pagingCB(&arg, Foo::doPaging, &foo);
  85.  
  86.                img->addPagingCallback(&pagingCB);
  87.  
  88.           The _u_s_e_r_A_r_g can be of any type. Its purpose is to maintain context
  89.           for the callback; it is not referenced by IL.  When the callback is
  90.           invoked, the _p_a_g_e_D_e_s_c argument will contain a pointer to this image
  91.           object and the location and status of the page.
  92.  
  93.      ddddooooPPPPaaaaggggiiiinnnnggggCCCCaaaallllllllbbbbaaaacccckkkkssss(((())))
  94.  
  95.           void  doPagingCallbacks(ilPagingCbArg* callerArg)
  96.  
  97.  
  98.           This function invokes all defined paging callbacks for this image
  99.           object; the _c_a_l_l_e_r_A_r_g argument specifies the page, and its _i_m_g
  100.           member should reference this image object.
  101.  
  102.      fffflllluuuusssshhhh(((())))
  103.  
  104.           ilStatus flush(int discard=FALSE)
  105.  
  106.  
  107.           This is a virtual function that must be implemented by the derived
  108.           class.  Its purpose is to write any modified data in the cache to
  109.           the backing store (if such a concept is relevant to the derived
  110.           class).  Derived classes that access an image file can call this
  111.           function in their destructor before the file is closed to ensure
  112.           that all data is written. If _d_i_s_c_a_r_d is TRUE, then the data in the
  113.           cache, after it is written out, is invalidated and all cache
  114.           parameters are reset. If FALSE, then the data in the cache remains
  115.           valid.
  116.  
  117.      ggggeeeettttCCCCaaaacccchhhheeeeSSSSiiiizzzzeeee(((())))
  118.  
  119.           virtual size_t getCacheSize()
  120.  
  121.  
  122.           This function returns the amount of cache memory, in bytes,
  123.           currently allocated by this image object.
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. iiiillllCCCCaaaacccchhhheeeeIIIImmmmgggg((((3333))))      IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll      iiiillllCCCCaaaacccchhhheeeeIIIImmmmgggg((((3333))))
  137.  
  138.  
  139.  
  140.      hhhhaaaassssPPPPaaaaggggiiiinnnnggggCCCCaaaallllllllbbbbaaaacccckkkkssss(((())))
  141.  
  142.           int  hasPagingCallbacks()
  143.  
  144.  
  145.           This function returns TRUE if there are any paging callbacks defined
  146.           for this image object; FALSE otherwise.
  147.  
  148.      lllliiiissssttttRRRReeeessssiiiiddddeeeennnntttt(((())))
  149.  
  150.           virtual ilStatus  listResident(ilCallback* cb)
  151.  
  152.  
  153.           The function traverses all the resident pages, invoking the paging
  154.           callback _c_b once for each resident page of this image.  The callback
  155.           should have a prototype as described for aaaaddddddddPPPPaaaaggggiiiinnnnggggCCCCaaaallllllllbbbbaaaacccckkkk().
  156.  
  157.      rrrreeeemmmmoooovvvveeeePPPPaaaaggggiiiinnnnggggCCCCaaaallllllllbbbbaaaacccckkkk(((())))
  158.  
  159.           ilStatus  removePagingCallback(ilCallback* cb)
  160.  
  161.  
  162.           This function removes a callback that was previously added with
  163.           aaaaddddddddPPPPaaaaggggiiiinnnnggggCCCCaaaallllllllbbbbaaaacccckkkk().
  164.  
  165. IIIINNNNHHHHEEEERRRRIIIITTTTEEEEDDDD MMMMEEEEMMMMBBBBEEEERRRR FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNNSSSS
  166.    IIIInnnnhhhheeeerrrriiiitttteeeedddd ffffrrrroooommmm iiiillllIIIImmmmaaaaggggeeee
  167.      addInput(), allocFillData(), checkColorModel(), checkValidOrder(),
  168.      checkValidType(), clipTile(), configureRetainedCache(), copy(),
  169.      copyTile(), copyTile3D(), copyTileCfg(), fillTile(), fillTile3D(),
  170.      fillTileRGB(), freeFillData(), getColorImg(), getColorModel(),
  171.      getColormap(), getCompression(), getConfig(), getCopyConverter(),
  172.      getCsize(), getDataType(), getDimensions(), getDirectInput(),
  173.      getDisplayCacheEnable(), getFill(), getFillData(), getFillValue(),
  174.      getHeight(), getHwEnable(), getHwHint(), getHwIntHint(), getHwOp(),
  175.      getHwPassTable(), getInput(), getInputTileRequirement(),
  176.      getLockTileSet(), getMaxColormapLevels(), getMaxValue(), getMinValue(),
  177.      getNumChans(), getNumInputs(), getOrder(), getOrientation(),
  178.      getPageBorder(), getPageBorderX(), getPageBorderY(), getPageBorderZ(),
  179.      getPageCounts(), getPageDelta(), getPageDimensions(), getPageIndices(),
  180.      getPageOrigin(), getPageOriginC(), getPageOriginX(), getPageOriginY(),
  181.      getPageOriginZ(), getPageSize(), getPageSizeC(), getPageSizePix(),
  182.      getPageSizeVal(), getPageSizeX(), getPageSizeY(), getPageSizeZ(),
  183.      getPixel(), getPixel3D(), getPriority(), getScaleMax(), getScaleMin(),
  184.      getSize(), getStrides(), getSubTile(), getSubTile3D(), getTile(),
  185.      getTile3D(), getWidth(), getXsize(), getYsize(), getZsize(),
  186.      hasPageBorder(), hasPages(), hwDefine(), hwGetPass(), inherit(),
  187.      initColorModel(), initHwEnable(), initMinMax(), initPageSize(),
  188.      initScaleMinMax(), isColorImg(), isIntegral(), isMirrorOrientation(),
  189.      isPartialPage(), isSigned(), isValidPage(), isWritable(), lockPage(),
  190.      lockPageSet(), lockTile(), lockTile3D(), mapFlipTrans(), mapFromInput(),
  191.      mapFromSource(), mapOrientation(), mapSize(), mapTile(), mapToInput(),
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. iiiillllCCCCaaaacccchhhheeeeIIIImmmmgggg((((3333))))      IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll      iiiillllCCCCaaaacccchhhheeeeIIIImmmmgggg((((3333))))
  203.  
  204.  
  205.  
  206.      mapToSource(), mapXY(), mapXYSign(), outOfBound(), qCopyTileCfg(),
  207.      qFillTile3D(), qFillTileRGB(), qGetSubTile3D(), qGetTile3D(),
  208.      qLockPageSet(), qSetSubTile3D(), qSetTile3D(), removeHwHint(),
  209.      removeInput(), reset(), setColorModel(), setColormap(), setCompression(),
  210.      setCsize(), setDataType(), setDisplayCacheEnable(), setFill(),
  211.      setFillValue(), setHwEnable(), setHwHint(), setHwIntHint(), setInput(),
  212.      setMaxColormapLevels(), setMaxValue(), setMinValue(), setNumChans(),
  213.      setNumInputs(), setOrder(), setOrientation(), setPageBorder(),
  214.      setPageSize(), setPageSizeC(), setPageSizeZ(), setPixel(), setPixel3D(),
  215.      setPriority(), setScaleMinMax(), setScaleType(), setSize(), setSubTile(),
  216.      setSubTile3D(), setTile(), setTile3D(), setTileRequirementFunction(),
  217.      setWritable(), setXsize(), setYsize(), setZsize(), unlockPage(),
  218.      unlockPageSet()
  219.  
  220.    IIIInnnnhhhheeeerrrriiiitttteeeedddd ffffrrrroooommmm iiiillllLLLLiiiinnnnkkkk
  221.      addResetCallback(), alterAction(), anyAltered(), clearAllowed(),
  222.      clearSet(), clearStatus(), deleteRelated(), disableAltered(),
  223.      dumpChain(), getClassPropSet(), getDescription(), getDirectParent(),
  224.      getDisabledIndex(), getFloatProp(), getGenerationID(), getIntProp(),
  225.      getMaxIndex(), getMinIndex(), getNumChildren(), getNumParents(),
  226.      getParent(), getProp(), getProp(), getPropSet(), getPtrProp(),
  227.      getRelatedChild(), getRelatedDelete(), getRelatedType(), getStatus(),
  228.      hasResetCallbacks(), ilGetClassPropSet(), inProgress(), isAllowed(),
  229.      isAltered(), isEnabled(), isRelated(), isSet(), markSet(), mpUnlock(),
  230.      neverReset(), newRelatedType(), removeParent(), removeProp(),
  231.      removeResetCallback(), reset(), resetAltered(), resetCheck(),
  232.      setAllowed(), setAltered(), setDescription(), setDisabledIndex(),
  233.      setEnabled(), setParent(), setProp(), setPropAltered(),
  234.      setRelatedDelete(), setRelatedType(), setStatus(), stopWatching(),
  235.      unalterable(), watch(), watchNotify()
  236.  
  237. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  238.      ilImage, ilMemCacheImg
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.